import java.util.Scanner;

public class T2 {

    /**
     * 控制台输入形似123/456 的数字 按“/”拆分后每个串逆序并且两数求和
     * @param args
     */
    public static void main(String[] args){
        System.out.println("输入:");
        Scanner sc = new Scanner(System.in);
        while (sc.hasNext()){
            String read = sc.nextLine();
            if(read.isEmpty()){continue;}
            String[] sp = read.split("/");
            if(sp.length!=2){continue;}
            boolean flag = true;
            for(String item:sp){
                try {
                    Integer.parseInt(item);
                }catch (NumberFormatException e){
                    flag = false;
                }
            }
            if(!flag){
                continue;
            }
            System.out.println(Integer.parseInt(new StringBuffer(sp[0]).reverse().toString())+Integer.parseInt(new StringBuffer(sp[1]).reverse().toString()));

        }

    }


}
